/****** Object:  Stored Procedure [dbo].spSanPhamUpdate Script Date: 6/11/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spSanPhamUpdate]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spSanPhamUpdate]
GO


/******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**		13/06/2012	SongTM					Innit created
*******************************************************************************/

CREATE PROCEDURE [dbo].[spSanPhamUpdate]
(
	@MaThuoc nvarchar(12),
	@TenHoatChat nvarchar(100),
	@TenBietDuoc nvarchar(100),
	@NongDoHamLuong nvarchar(100),
	@DangBaoChe nvarchar(150),
	@QuyCach nvarchar(100),
	@SoDangKy nvarchar(20),
	@XuatXu nvarchar(30),
	@NhaSX nvarchar(50),
	@NhaNK nvarchar(50),
	@GhiChu nvarchar(200),
	@MaDonVi nvarchar(6),
	@MaNH nvarchar(4)
)

WITH ENCRYPTION

AS

SET NOCOUNT ON

UPDATE [tbl_SanPham]
SET [TenHoatChat] = @TenHoatChat,
	[TenBietDuoc] = @TenBietDuoc,
	[NongDoHamLuong] = @NongDoHamLuong,
	[DangBaoChe] = @DangBaoChe,
	[QuyCach] = @QuyCach,
	[SoDangKy] = @SoDangKy,
	[XuatXu] = @XuatXu,
	[NhaSX] = @NhaSX,
	[NhaNK] = @NhaNK,
	[GhiChu] = @GhiChu,
	[MaDonVi] = @MaDonVi,
	[MaNH] = @MaNH
WHERE	[MaThuoc] = @MaThuoc
GO

--GRANT EXECUTE ON [dbo].[spSanPhamUpdate] TO [sa]
--GO
